#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QDesktopWidget>
#include "workthread.h"
#include <QKeyEvent>

namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    ~Widget();
    virtual void keyPressEvent(QKeyEvent *ev);


signals:
    void sendData(QString);  //用来传送数据
    void stopTest();        //用来中断某次测试

private slots:

    void on_pushButton_clicked();
    void OnMsgSignal(const QString& temp);//接收子线程传递的字符串用于显示
    void on_pushButton_2_clicked();

private:
    Ui::Widget *ui;
    workthread *m_thread;
};

#endif // WIDGET_H
